﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once        
#include "IFamilyDimensionConstraint.h"
#include "GmFamilyService.h"

namespace gfam
{

    /// \brief  直径约束
    class GM_FAMILY_SERVICE_EXPORT IFamilyDiameterConstraint : public IFamilyDimensionConstraint
    {
        DEFINE_CAST_DERIVED(gfam::IFamilyDiameterConstraint, gfam::IFamilyDimensionConstraint)
    public:

        /// \brief  创建直径约束
        ///
        /// \param  pDocument  文档
        /// \param  sketchId 草图id
        /// \param  option  创建选项
        /// \return 直径约束
        static IFamilyDiameterConstraint* Create(gcmp::IDocument* pDocument, const gcmp::ElementId& sketchId, gcmp::ElementCreationOptions option = gcmp::ElementCreationOptions::Normal);
        
        /// \brief  创建直径约束
        ///
        /// \param  pDocument  文档
        /// \param  position 位置
        /// \param  value 直径值
        /// \param  referenceObjectId 引用对象id
        /// \param  sketchId 草图id
        /// \param  sketchPlaneId 草图平面id
        /// \param  coord 坐标系（平面id合法时使用平面的坐标系，否则使用传入的坐标系）
        /// \param  option  创建选项
        /// \return 直径约束
        static IFamilyDiameterConstraint* Create(gcmp::IDocument* pDocument,
            const gcmp::Vector3d& position,
            double value,
            const gcmp::ElementId& referenceObjectId,
            const gcmp::ElementId& sketchId,
            const gcmp::ElementId& sketchPlaneId,
            const gcmp::Coordinate3d& coord,
            gcmp::ElementCreationOptions eco = gcmp::ElementCreationOptions::Normal);

    };
}